﻿using System;
using Styx;

namespace Example
{
    public class UserInfoEventArgs : EventArgs, ISerializable
    {
        private string _userName;

        public UserInfoEventArgs()
        {
            _userName = "";
        }

        public UserInfoEventArgs(string userName)
        {
            _userName = userName;
        }

        public string UserName
        {
            get { return _userName; }
        }

        public virtual void FromStream(System.IO.Stream stream)
        {
            _userName = Serialize.ValueFromStream<string>(stream);
        }

        public virtual void ToStream(System.IO.Stream stream)
        {
            Serialize.ValueToStream<string>(stream, _userName);
        }
    }
}
